import turtle
turtle.speed(0)
def up_goto(pos):
    turtle.up()
    turtle.goto(pos)
    turtle.down()

def hand(n, size, dis ):
    """
    绘制针
    :param n: 数字
    :param size: 画笔粗细
    :param dis:  移动的距离
    :return:
    """
    turtle.up()
    turtle.home()
    turtle.down()
    turtle.left(90)
    turtle.right(n * 6)
    turtle.pensize(size)
    turtle.forward(dis)

def clock():
    global s, m, h
    turtle.home()
    turtle.clear()
    up_goto([0, 200])
    turtle.pensize(5)
    for i in range(1, 61):
        turtle.up()
        turtle.circle(-200, 6)
        turtle.down()
        if i%5==0:
            turtle.left(90)
            turtle.forward(10)
            turtle.up()
            turtle.forward(20)
            turtle.down()
            turtle.write(i//5, False, 'center',(None, 12, 'normal'))
            turtle.up()
            turtle.backward(20)
            turtle.down()
            turtle.backward(10)
            turtle.right(90)
        else:
            turtle.dot(5)


    hand(s, 2, 150)
    hand(m, 5, 100)
    hand(h, 8, 50)

    turtle.dot(1)
    s+=1
    if s >=60:
        s = 0
        m+=1
        if m >=60:
            h+=1
            m=0
            if h>12:
                h = 0

    turtle.ontimer(clock, 1000)

s = 0
m = 0
h = 0
turtle.tracer(False)
clock()
turtle.done()